<?php
	$uri_value = $this->uri->segment(2);	
	$count_i = 0;	
	$count_j = 0;	
?>
<ul id="topnav">
   <li class="first_topnav">
   		<a href="<?php echo base_url()?>back_end/backend" style="padding: 0px 15px; color: #fff;">Trang chủ</a>
   </li>
   <?php foreach ($category_admin_1 as $category_admin_arr_1) { ?>
   <li class="<?php if ($category_admin_active['root_path'] == $category_admin_arr_1['id']) { echo 'active_topnav_3 active_topnav_2'; } ?>" >
   		<a style="cursor: pointer;">
   			<?php
   				$count_j++;
   				$count_character = strlen($category_admin_arr_1['name']);
   				$count_i += $count_character;  
   				echo $category_admin_arr_1['name'];
   			?>
   		</a>
		<ul  style="display:<?php if ($category_admin_active['root_path'] == $category_admin_arr_1['id']) { echo 'block';} ?>" class="children">
		   <li style="margin-left: <?php if($count_j == 1){ echo 0; } else { echo ($count_i*2)+($count_j*40); }?>px;">&nbsp;</li>	
		   <?php foreach ($category_admin_2 as $category_admin_arr_2) { ?>
		   <?php if( $category_admin_arr_2['root_path'] == $category_admin_arr_1['id']) {?>	
	       		<li>
	       			<a style="<?php if($category_admin_arr_2['id'] == $category_admin_active['id']) { echo 'text-decoration: underline'; } ?>" href="<?php echo base_url().'back_end/'.$category_admin_arr_2['link']; ?>"><?php echo $category_admin_arr_2['name']; ?></a>
	       		</li>
	       <?php }?>		
	       <?php }?>
       </ul>
   </li>
   <?php }?>
</ul>
<div class="cl_clear"></div>